package com.szsh.aiot.hsm.domain.camera;

import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;

import java.time.Instant;
import java.util.Date;


/**
 * 异常登录信息
 * 
 * @author zhangtt
 *
 */
@Measurement(name = "abnormal_login")
public class AbnormalLogin {

    /** 登录时间 */
    @Column(name = "time")
    private Instant time;
    /** 手机号码哈希值 */
    @Column(name = "hashPhone", tag = true)
    private String hashPhone;
    /** 手机号码 */
    @Column(name = "phone")
    private String phone;
    /** 登录app */
    @Column(name = "appid")
    private Integer appid;
    /** 登录设备 */
    @Column(name = "device")
    private String device;
    /** 登录省份 */
    @Column(name = "province")
    private String province;
    /** 登录城市 */
    @Column(name = "city")
    private String city;
    /** 登录城市 */
    @Column(name = "loginIP")
    private String loginIP;

    private Date loginTime;

    public Instant getTime() {
        return time;
    }

    public void setTime(Instant time) {
        this.time = time;
    }

    public String getHashPhone() {
        return hashPhone;
    }

    public void setHashPhone(String hashPhone) {
        this.hashPhone = hashPhone;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getAppid() {
        return appid;
    }

    public void setAppid(Integer appid) {
        this.appid = appid;
    }

    public String getDevice() {
        return device;
    }

    public void setDevice(String device) {
        this.device = device;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getLoginIP() {
        return loginIP;
    }

    public void setLoginIP(String loginIP) {
        this.loginIP = loginIP;
    }

    public Date getLoginTime() {
        this.loginTime = Date.from(time);
        return this.loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

}
